<html>
<head><meta charset="utf-8"><title>Keywords Crate · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Keywords.20Crate.html">Keywords Crate</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="198608199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Keywords%20Crate/near/198608199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sean Klein <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Keywords.20Crate.html#198608199">(May 25 2020 at 01:10)</a>:</h4>
<p>Noob question  - working with some generated code, and I'm seeing a lot of crates hand-roll the list of reserved keywords here: <a href="https://doc.rust-lang.org/reference/keywords.html">https://doc.rust-lang.org/reference/keywords.html</a></p>
<p>Is there a better solution? Is there some API I'm struggling to find that basically just implements:</p>
<p>pub fn is_keyword(&amp;str) -&gt; bool;</p>
<p>I know this is simple, but it smells to me like "I shouldn't be maintaining this list myself" sorta code</p>



<a name="198608205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Keywords%20Crate/near/198608205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sean Klein <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Keywords.20Crate.html#198608205">(May 25 2020 at 01:11)</a>:</h4>
<p>(If the answer is "you should make a crate", I'm happy to do that, but wanted to cast a net first and see if there was something I'm missing)</p>



<a name="198638598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Keywords%20Crate/near/198638598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Keywords.20Crate.html#198638598">(May 25 2020 at 06:48)</a>:</h4>
<p>Maybe when rust-analyzer and rustc are going to share the same parser in the future, but at the moment I don't think there is a crate for that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>